import { request } from "@/utils/service"
import { getToken } from "@/utils/cache/cookies"
import axios from "axios"
const baseURL = import.meta.env.VITE_BASE_API
// 查询订单列表
export function orderallocationQuery(params: any) {
  return request({
    url: "orderallocation/query",
    method: "get",
    params
  })
}

// 分配
export function updateOrderallocationApi(data: any) {
  return request({
    url: "orderallocation/allocation",
    method: "post",
    data
  })
}

// 查询业务员订单列表
export function orderallocationQueryOrde(params: any) {
  return request({
    url: "orderallocation/queryOrder",
    method: "get",
    params
  })
}

// 备注
export function updateRemarkApi(params: any) {
  return request({
    url: "orderallocation/update",
    method: "get",
    params
  })
}

// 查询呼叫记录
export function orderallocationQueryRecord(params: any) {
  return request({
    url: "orderallocation/queryRecord",
    method: "get",
    params
  })
}
// 呼入记录导出
export function downLoadRecord(params: any) {
  return axios({
    url: `${baseURL}/orderallocation/download`,
    method: "get",
    headers: {
      "Content-Type": "multipart/form-data",
      token: getToken()
    },
    params,
    responseType: "blob"
  })
}
